<?php
namespace Components\Staff\Sha\ACL\Roles;

class Facade {
  public function pager($query) {
    if(!isset($query['page'])) {
      $query['page'] = 1;
    } else if($query['page'] <= 0)  {
      $query['page'] = 1;
    } else {
      $query['page'] = abs($query['page']);
    }

    if(!isset($query['limit'])) {
      $query['limit'] = 10;
    } else if($query['limit'] <= 0)  {
      $query['limit'] = 10;
    } else {
      $query['limit'] = abs($query['limit']);
    }

    return (new Logic()) -> pager($query['limit'], $query['page']);
  }

}
